//封装一个函数：获取一个结果：当前早上|上午|下午|晚上
export const getTime=()=> {
  let message='';
  //通过内置构造函数Date
  let hour =new Date().getHours();
  //情况的判断
  if (hour < 6) {
    message= "凌晨好呀";
  }
  else if (hour < 9) {
    message= "早上好呀";
  }
  else if (hour < 12) {
      message= "上午好呀";
  }
  else if (hour < 14) {
      message= "中午好呀";
  }
  else if (hour < 17) {
      message= "下午好呀";
  }
  else if (hour < 19) {
      message= "傍晚好呀";
  }
  else if (hour < 22) {
      message= "晚上好呀";
  }
  else {
      message= "夜里好呀";
  }
  return message;

}